
@echo on
cd /d %~dp0
set path=%~dp0;%path%;

set VerXXX=2.25.2
if not exist MaterialTest%VerXXX% (mkdir MaterialTest%VerXXX%)
if not exist MaterialTestFSS mkdir MaterialTestFSS



cd /d %~dp0
xcopy ..\BinZ\Release\*.dll  MaterialTest%VerXXX%   /y /q
xcopy ..\BinZ\Release\*.exe  MaterialTest%VerXXX% /y /q
::xcopy ..\BinZ\Release\MaterialTest.pdb  MaterialTest%VerXXX% /y /q

cd /d %~dp0
cd /d MaterialTest%VerXXX%
call ../TGenClear.bat




echo Get Ver
cd /d %~dp0../MaterialTest
call version.bat
echo Version %major_ver%.%minor_ver%.%revsion_ver%.%revnum% %revset%
for /f "tokens=2 delims==" %%a in ('wmic path win32_operatingsystem get LocalDateTime /value') do (
  set t=%%a
)
set datetime=%t:~0,4%_%t:~4,2%%t:~6,2%_%t:~8,2%%t:~10,2%
set curversion=%major_ver%.%minor_ver%.%revsion_ver%.%revnum%
echo %datetime% %curversion%



cd /d %~dp0
del /s /q /f MaterialTest%curversion%-Mini.zip



cd /d %~dp0
cd /d MaterialTest%VerXXX%
del /s /f /q vc17redist.x86.exe
del /s /f /q MtCamRs.exe
del /s /f /q datgrd.dll
del /s /f /q CrashRptShow.dll
del /s /f /q MdbVz.exe
del /s /f /q *.pdb
del /s /f /q updatemx*.exe
del /f /s /q *.ini 
del /f /s /q lang.csv 
7za a ../MaterialTest%curversion%-Mini.zip .  -bb3 -r -mx3 

cd /d %~dp0
del /s /q /f MaterialTestFSS\MaterialTest%curversion%-Mini.zip
move MaterialTest%curversion%-Mini.zip MaterialTestFSS\MaterialTest%curversion%-Mini.zip


@ping 127.0.0.1 -n 5 >nul
